package com.kcral.javase.ch.properties;

/**
 * @TODO
 * @Author xu
 * 2025/3/3
 */
public class TestOrderSystem {
    public static void main(String[] args) {
        // 创建用户
        User user = new User("张三");

        // 用户下单
        Order order = user.placeOrder("ORD123456");

        // 创建货物
        Goods goods1 = new Goods("笔记本", 15.5, "A5大小的笔记本");
        Goods goods2 = new Goods("钢笔", 7.0, "黑色钢笔，书写流畅");
        Goods goods3 = new Goods("书包", 99.0, "耐磨防水书包");

        // 将货物加入订单
        order.addGoods(goods1);
        order.addGoods(goods2);
        order.addGoods(goods3);

        // 查看订单的货物详情
        order.showGoodsDetails();
    }

}
